// run: $exec < input
#include <iostream>
#include <iomanip>
#include <cmath>

double const eps = 1e-8;

template <class T>
T abs(T x) { return x < 0 ? -x : x; }

struct point { double x, y, z; };
point operator-(point const& a)
{
	return {-a.x, -a.y, -a.z};
}

point operator*(point const& a, double l)
{
	return {a.x * l, a.y * l, a.z * l};
}

point operator/(point const& a, double l)
{
	return {a.x / l, a.y / l, a.z / l};
}

point operator+(point const& a, point const& b)
{
	return {a.x + b.x, a.y + b.y, a.z + b.z};
}

point operator-(point const& a, point const& b)
{
	return {a.x - b.x, a.y - b.y, a.z - b.z};
}

std::istream& operator>>(std::istream& is, point& a)
{
	is >> a.x >> a.y >> a.z;
	return is;
}

point p[4];
double r;

point xmult(point const& a, point const& b)
{
	return {a.y * b.z - a.z * b.y, a.z * b.x - a.x * b.z, a.x * b.y - a.y * b.x};
}

double dot(point const& a, point const& b)
{
	return a.x * b.x + a.y * b.y + a.z * b.z;
}

double len(point const& a)
{
	return sqrt(a.x * a.x + a.y * a.y + a.z * a.z);
}

double triangle(point const& a, point const& b)
{
	return abs(len(xmult(a, b))) / 2.0;
}

double volume()
{
	return abs(dot(xmult(p[1], p[2]), p[3])) / 6.0;
}

double a[4][4];

void get_coe(double a[4], point const& p1, point const& p2, point const& p3, point const& p0)
{
	auto l1 = p2 - p1;
	auto l2 = p3 - p1;
	auto l3 = xmult(l1, l2);
	l3 = l3 / len(l3);
	if (dot(l3, p0 - p1) < 0) l3 = -l3;
	auto pp1 = p1 + l3 * r;
//	auto pp2 = p2 + l3 * r;
//	auto pp3 = p3 + l3 * r;
	a[0] = l3.x; a[1] = l3.y; a[2] = l3.z;
	a[3] = pp1.x * l3.x + pp1.y * l3.y + pp1.z * l3.z;
}

double det[3][3];
double tmp[3][3];

double det_calc()
{
	double a1 = det[0][0], a2 = det[1][0], a3 = det[2][0];
	double b1 = det[0][1], b2 = det[1][1], b3 = det[2][1];
	double c1 = det[0][2], c2 = det[1][2], c3 = det[2][2];
	return a1 * b2 * c3 + b1 * c2 * a3 + c1 * a2 * b3 - a3 * b2 * c1
		- b3 * c2 * a1 - c3 * a2 * b1;
}

int main()
{
	std::ios::sync_with_stdio(false);
	while (std::cin >> p[0] >> p[1] >> p[2] >> p[3]) {
		auto pp = p[0];
		for (int i = 1; i <= 3; i++) { p[i].x -= p[0].x; p[i].y -= p[0].y; p[i].z -= p[0].z; }
		p[0].x = p[0].y = p[0].z = 0;

		double v = volume();
		double s = triangle(p[1], p[2]) + triangle(p[1], p[3]) + triangle(p[2], p[3])
						+ triangle(p[3] - p[1], p[2] - p[1]);

		if ((abs(s) < eps) || abs(v) < eps) {
			std::cout << "O O O O\n";
			continue;
		}
		r = 3.0 * v / s;
		get_coe(a[0], p[1], p[2], p[3], p[0]);
		get_coe(a[1], p[0], p[2], p[3], p[1]);
		get_coe(a[2], p[0], p[1], p[3], p[2]);

		for (int i = 0; i < 3; i++)
			for (int j = 0; j < 3; j++) tmp[i][j] = a[i][j];
		for (int i = 0; i < 3; i++)
			for (int j = 0; j < 3; j++) det[i][j] = tmp[i][j];
		double d = det_calc();

		for (int i = 0; i < 3; i++)
			for (int j = 0; j < 3; j++) det[i][j] = tmp[i][j];
		for (int i = 0; i < 3; i++) det[i][0] = a[i][3];
		double dx = det_calc() / d;

		for (int i = 0; i < 3; i++)
			for (int j = 0; j < 3; j++) det[i][j] = tmp[i][j];
		for (int i = 0; i < 3; i++) det[i][1] = a[i][3];
		double dy = det_calc() / d;

		for (int i = 0; i < 3; i++)
			for (int j = 0; j < 3; j++) det[i][j] = tmp[i][j];
		for (int i = 0; i < 3; i++) det[i][2] = a[i][3];
		double dz = det_calc() / d;
		if ((abs(s) < eps) || abs(v) < eps)
			std::cout << "O O O O\n";
		else {
			dx += pp.x; dy += pp.y; dz += pp.z;
			std::cout << std::fixed << std::setprecision(4)
				<< dx << " " << dy << " " << dz << " " << r << "\n";
		}
	}
}

